const Base = require('../../base.js');

module.exports = class extends Base {
  async indexAction() {
    console.log(123123)
    let type = this.get('type')
    let userInfo = await this.session('user_info')
    if (!userInfo) return this.fail(-1, '未登录授权')

    let list = await this.model('deal/index').list(userInfo._id, type)

    this.json({
      status: 200, message: 'success', data: list
    })
  }
};
